<?php
class CategoryModel extends Model{

 public $table='category';
 // 获得所有栏目
 public function getAll(){
   return $this->order('cid ASC')->select();


 }

public function addCatagory($data){
   if(empty($data['catname'])){
   	  $this->error='栏目名不能为空';
   	  return false;
   }
    return $this->insert($data);


}
public function deleteClass(){
	$this->delete();
}

}









?>